﻿@model ProfilePostsModel
@using Nop.Web;
@using Nop.Web.Extensions;
@using Nop.Web.Models.Profile;
<div class="user-last-posts">
    @if (Model.Posts.Count > 0)
    {
        <table class="posts-table">
            <col />
            <tbody>
                @for (int i = 0; i < Model.Posts.Count; i++)
                {
                    var item = Model.Posts[i];
                    <tr>
                        <td class="a-left">
                            <div class="topic">
                                <div class="topic-title">
                                    <span>@T("Profile.Topic")</span>:
                                    @Html.RouteLink(item.ForumTopicTitle, "TopicSlug", new { id = item.ForumTopicId, slug = item.ForumTopicSlug })
                                </div>
                                <div class="topic-body">
                                    <span>@Html.Raw(item.ForumPostText)</span></div>
                                <div class="topic-data">
                                    <span>
                                        @T("Profile.PostedOn")</span>: <span>@item.Posted</span></div>
                            </div>
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    }
    else
    {
        @T("Profile.LatestPosts.NoPosts")
    }
    @if (Model.PagerModel.TotalPages > 1)
    {
        <div class="latest-posts-grid-pager-style">
            @Html.Pager(Model.PagerModel)
        </div>
    }
</div>
